<?php get_instance()->view('common/header');?>
<link rel="stylesheet" href="<?php echo $this->staticUrl?>css/jquery-weui.css">
<body>
    <form action="" id="save-form" method="post">
        <div class="mt10 wp80 m0a">
            <div class="hengleft p10_0 bor_bb">
                <input class="weui-input f09" type="text" placeholder="请输入卡名称" name="account_name">
            </div>
            <div class="hengleft p10_0 bor_bb">
                <input class="weui-input f09" type="number" pattern="[0-9]*" placeholder="请输入电话号码" name="mobile">
            </div>
            <div class="hengleft p10_0 bor_bb">
                <p class="f09 cor9">
                    <input type="text" class="bank b0" placeholder="请选择银行" readonly >
                    <input type="hidden" name="bank_id">
                </p>
            </div>
            <div class="hengleft p10_0 bor_bb mb20">
                <input class="weui-input f09" type="text" placeholder="请输入储蓄卡卡号" name="account_number">
            </div>
            <button class="kbtn mt20 add">确认添加</button>
        </div>
    </form>
</body>
<script src="<?php echo $this->staticUrl?>js/jquery-weui.js"></script>
<script src="<?php echo $this->staticUrl?>js/base.js"></script>
<script type="text/javascript">
    $(function () {
        $(".add").on('click', function () {
            $("[name='bank_id']").val($(".bank").attr('data-values'));
        });

        $.e_validate.init('#save-form',{saveMessage:'保存中...'});

        //商户列表分类筛选
        $(".bank").select({
            title: "选择银行",
            items: <?php echo $list?>
        });
    })
</script>
</html>